3.1.4 \(\int (d+e x) (a+b \tanh ^{-1}(c x)) \, dx\) [4]

Optimal. Leaf size=84 \[ \frac {b e x}{2 c}+\frac {(d+e x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}+\frac {b (c d+e)^2 \log (1-c x)}{4 c^2 e}-\frac {b (c d-e)^2 \log (1+c x)}{4 c^2 e} \]

[Out]

1/2*b*e*x/c+1/2*(e*x+d)^2*(a+b*arctanh(c*x))/e+1/4*b*(c*d+e)^2*ln(-c*x+1)/c^2/e-1/4*b*(c*d-e)^2*ln(c*x+1)/c^2/
e

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6063, 716, 647, 31} \begin {gather*} \frac {(d+e x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}-\frac {b (c d-e)^2 \log (c x+1)}{4 c^2 e}+\frac {b (c d+e)^2 \log (1-c x)}{4 c^2 e}+\frac {b e x}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)*(a + b*ArcTanh[c*x]),x]

[Out]

(b*e*x)/(2*c) + ((d + e*x)^2*(a + b*ArcTanh[c*x]))/(2*e) + (b*(c*d + e)^2*Log[1 - c*x])/(4*c^2*e) - (b*(c*d -
e)^2*Log[1 + c*x])/(4*c^2*e)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 647

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[e/2 + c*(d/(2*q)),
Int[1/(-q + c*x), x], x] + Dist[e/2 - c*(d/(2*q)), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[(-a)*c]

Rule 716

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 6063

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b
*ArcTanh[c*x])/(e*(q + 1))), x] - Dist[b*(c/(e*(q + 1))), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rubi steps

\begin {align*} \int (d+e x) \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac {(d+e x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}-\frac {(b c) \int \frac {(d+e x)^2}{1-c^2 x^2} \, dx}{2 e}\\ &=\frac {(d+e x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}-\frac {(b c) \int \left (-\frac {e^2}{c^2}+\frac {c^2 d^2+e^2+2 c^2 d e x}{c^2 \left (1-c^2 x^2\right )}\right ) \, dx}{2 e}\\ &=\frac {b e x}{2 c}+\frac {(d+e x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}-\frac {b \int \frac {c^2 d^2+e^2+2 c^2 d e x}{1-c^2 x^2} \, dx}{2 c e}\\ &=\frac {b e x}{2 c}+\frac {(d+e x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}+\frac {\left (b (c d-e)^2\right ) \int \frac {1}{-c-c^2 x} \, dx}{4 e}-\frac {\left (b (c d+e)^2\right ) \int \frac {1}{c-c^2 x} \, dx}{4 e}\\ &=\frac {b e x}{2 c}+\frac {(d+e x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 e}+\frac {b (c d+e)^2 \log (1-c x)}{4 c^2 e}-\frac {b (c d-e)^2 \log (1+c x)}{4 c^2 e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 96, normalized size = 1.14 \begin {gather*} a d x+\frac {b e x}{2 c}+\frac {1}{2} a e x^2+b d x \tanh ^{-1}(c x)+\frac {1}{2} b e x^2 \tanh ^{-1}(c x)+\frac {b e \log (1-c x)}{4 c^2}-\frac {b e \log (1+c x)}{4 c^2}+\frac {b d \log \left (1-c^2 x^2\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)*(a + b*ArcTanh[c*x]),x]

[Out]

a*d*x + (b*e*x)/(2*c) + (a*e*x^2)/2 + b*d*x*ArcTanh[c*x] + (b*e*x^2*ArcTanh[c*x])/2 + (b*e*Log[1 - c*x])/(4*c^
2) - (b*e*Log[1 + c*x])/(4*c^2) + (b*d*Log[1 - c^2*x^2])/(2*c)

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 99, normalized size = 1.18

method result size
derivativedivides \(\frac {\frac {a \left (d \,c^{2} x +\frac {1}{2} e \,c^{2} x^{2}\right )}{c}+b \arctanh \left (c x \right ) d c x +\frac {b c \arctanh \left (c x \right ) e \,x^{2}}{2}+\frac {b e x}{2}+\frac {b \ln \left (c x -1\right ) d}{2}+\frac {b \ln \left (c x -1\right ) e}{4 c}+\frac {b \ln \left (c x +1\right ) d}{2}-\frac {b \ln \left (c x +1\right ) e}{4 c}}{c}\) \(99\)
default \(\frac {\frac {a \left (d \,c^{2} x +\frac {1}{2} e \,c^{2} x^{2}\right )}{c}+b \arctanh \left (c x \right ) d c x +\frac {b c \arctanh \left (c x \right ) e \,x^{2}}{2}+\frac {b e x}{2}+\frac {b \ln \left (c x -1\right ) d}{2}+\frac {b \ln \left (c x -1\right ) e}{4 c}+\frac {b \ln \left (c x +1\right ) d}{2}-\frac {b \ln \left (c x +1\right ) e}{4 c}}{c}\) \(99\)
risch \(\frac {b x \left (e x +2 d \right ) \ln \left (c x +1\right )}{4}-\frac {b e \,x^{2} \ln \left (-c x +1\right )}{4}-\frac {b d x \ln \left (-c x +1\right )}{2}+\frac {a e \,x^{2}}{2}+a d x +\frac {\ln \left (c x +1\right ) b d}{2 c}+\frac {\ln \left (-c x +1\right ) b d}{2 c}+\frac {b e x}{2 c}-\frac {\ln \left (c x +1\right ) b e}{4 c^{2}}+\frac {\ln \left (-c x +1\right ) b e}{4 c^{2}}\) \(118\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(a+b*arctanh(c*x)),x,method=_RETURNVERBOSE)

[Out]

1/c*(a/c*(d*c^2*x+1/2*e*c^2*x^2)+b*arctanh(c*x)*d*c*x+1/2*b*c*arctanh(c*x)*e*x^2+1/2*b*e*x+1/2*b*ln(c*x-1)*d+1
/4*b/c*ln(c*x-1)*e+1/2*b*ln(c*x+1)*d-1/4*b/c*ln(c*x+1)*e)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 85, normalized size = 1.01 \begin {gather*} \frac {1}{2} \, a x^{2} e + a d x + \frac {1}{4} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} b e + \frac {{\left (2 \, c x \operatorname {artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} b d}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctanh(c*x)),x, algorithm="maxima")

[Out]

1/2*a*x^2*e + a*d*x + 1/4*(2*x^2*arctanh(c*x) + c*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3))*b*e + 1/2*(
2*c*x*arctanh(c*x) + log(-c^2*x^2 + 1))*b*d/c

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 137, normalized size = 1.63 \begin {gather*} \frac {4 \, a c^{2} d x + 2 \, {\left (a c^{2} x^{2} + b c x\right )} \cosh \left (1\right ) + {\left (2 \, b c d - b \cosh \left (1\right ) - b \sinh \left (1\right )\right )} \log \left (c x + 1\right ) + {\left (2 \, b c d + b \cosh \left (1\right ) + b \sinh \left (1\right )\right )} \log \left (c x - 1\right ) + {\left (b c^{2} x^{2} \cosh \left (1\right ) + b c^{2} x^{2} \sinh \left (1\right ) + 2 \, b c^{2} d x\right )} \log \left (-\frac {c x + 1}{c x - 1}\right ) + 2 \, {\left (a c^{2} x^{2} + b c x\right )} \sinh \left (1\right )}{4 \, c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctanh(c*x)),x, algorithm="fricas")

[Out]

1/4*(4*a*c^2*d*x + 2*(a*c^2*x^2 + b*c*x)*cosh(1) + (2*b*c*d - b*cosh(1) - b*sinh(1))*log(c*x + 1) + (2*b*c*d +
 b*cosh(1) + b*sinh(1))*log(c*x - 1) + (b*c^2*x^2*cosh(1) + b*c^2*x^2*sinh(1) + 2*b*c^2*d*x)*log(-(c*x + 1)/(c
*x - 1)) + 2*(a*c^2*x^2 + b*c*x)*sinh(1))/c^2

________________________________________________________________________________________

Sympy [A]
time = 0.22, size = 92, normalized size = 1.10 \begin {gather*} \begin {cases} a d x + \frac {a e x^{2}}{2} + b d x \operatorname {atanh}{\left (c x \right )} + \frac {b e x^{2} \operatorname {atanh}{\left (c x \right )}}{2} + \frac {b d \log {\left (x - \frac {1}{c} \right )}}{c} + \frac {b d \operatorname {atanh}{\left (c x \right )}}{c} + \frac {b e x}{2 c} - \frac {b e \operatorname {atanh}{\left (c x \right )}}{2 c^{2}} & \text {for}\: c \neq 0 \\a \left (d x + \frac {e x^{2}}{2}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*atanh(c*x)),x)

[Out]

Piecewise((a*d*x + a*e*x**2/2 + b*d*x*atanh(c*x) + b*e*x**2*atanh(c*x)/2 + b*d*log(x - 1/c)/c + b*d*atanh(c*x)
/c + b*e*x/(2*c) - b*e*atanh(c*x)/(2*c**2), Ne(c, 0)), (a*(d*x + e*x**2/2), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 245 vs. \(2 (76) = 152\).
time = 0.42, size = 245, normalized size = 2.92 \begin {gather*} -c {\left (\frac {b d \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{2}} - \frac {{\left (\frac {{\left (c x + 1\right )} b c d}{c x - 1} - b c d + \frac {{\left (c x + 1\right )} b e}{c x - 1}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{3}}{c x - 1} + c^{3}} - \frac {b d \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{2}} - \frac {\frac {2 \, {\left (c x + 1\right )} a c d}{c x - 1} - 2 \, a c d + \frac {2 \, {\left (c x + 1\right )} a e}{c x - 1} + \frac {{\left (c x + 1\right )} b e}{c x - 1} - b e}{\frac {{\left (c x + 1\right )}^{2} c^{3}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{3}}{c x - 1} + c^{3}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctanh(c*x)),x, algorithm="giac")

[Out]

-c*(b*d*log(-(c*x + 1)/(c*x - 1) + 1)/c^2 - ((c*x + 1)*b*c*d/(c*x - 1) - b*c*d + (c*x + 1)*b*e/(c*x - 1))*log(
-(c*x + 1)/(c*x - 1))/((c*x + 1)^2*c^3/(c*x - 1)^2 - 2*(c*x + 1)*c^3/(c*x - 1) + c^3) - b*d*log(-(c*x + 1)/(c*
x - 1))/c^2 - (2*(c*x + 1)*a*c*d/(c*x - 1) - 2*a*c*d + 2*(c*x + 1)*a*e/(c*x - 1) + (c*x + 1)*b*e/(c*x - 1) - b
*e)/((c*x + 1)^2*c^3/(c*x - 1)^2 - 2*(c*x + 1)*c^3/(c*x - 1) + c^3))

________________________________________________________________________________________

Mupad [B]
time = 0.83, size = 67, normalized size = 0.80 \begin {gather*} a\,d\,x+\frac {a\,e\,x^2}{2}+b\,d\,x\,\mathrm {atanh}\left (c\,x\right )+\frac {b\,e\,x}{2\,c}-\frac {b\,e\,\mathrm {atanh}\left (c\,x\right )}{2\,c^2}+\frac {b\,e\,x^2\,\mathrm {atanh}\left (c\,x\right )}{2}+\frac {b\,d\,\ln \left (c^2\,x^2-1\right )}{2\,c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x))*(d + e*x),x)

[Out]

a*d*x + (a*e*x^2)/2 + b*d*x*atanh(c*x) + (b*e*x)/(2*c) - (b*e*atanh(c*x))/(2*c^2) + (b*e*x^2*atanh(c*x))/2 + (
b*d*log(c^2*x^2 - 1))/(2*c)

________________________________________________________________________________________